/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author virginie, william, jef
 */
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.EntityTag;
import com.google.common.base.Objects;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
  
@Path("/ville")
public class VilleRessource {
  @POST
  @Path("/{id}/marker")
  public Response ajouterMarkerVille(@PathParam("id") long id, Marker marker) {
   // Ville.put("marker", marker);
    return Response.status(Status.ACCEPTED).build();
  }
  
  @GET
  @Path("/{id}/marker")
  public Response stock(@PathParam("id") long id) {
    Ville ville = new Ville();
    return Response.ok(ville).tag(eTag(id, 1)).build();
  }
  
  private EntityTag eTag(long id, int quantity) {
    return new EntityTag(String.valueOf(Objects.hashCode(id, quantity)));
  }
  
  
}